package shapes;



public class Square extends Shapes {

	private int side;
	static {
		ShapesFactory.registerShape("Square", new Square());
	}
	protected Square() {
		super();
		this.side = random.nextInt(100)+1;
	}

	protected Square(int x, int y, int side) {
		super(x, y);
		this.side = side;
	}

	@Override
	public void draw() {
		System.out.println ("Drawing SQUARE #"+this.getID() + " : Origin=[" + this.getX() + "," + this.getY() + "], Side=" + this.side);
	}
	
	@Override
	public void move(int dX, int dY)
	{
		super.move(dX,dY);
		System.out.println ("Moving SQUARE #" + this.getID() + " by x=" + dX + ", y=" + dY);
		this.draw();
	}

	@Override
	public Shapes createShape() {
		return new Square();
	}

}
